class Player(object):
    # 统计玩家数量
    number = 0  # 类属性

    def __init__(self, name, age):
        self.name = name  # 实例属性
        self.age = age
        Player.number += 1

    def introduce(self):
        print("我是LOL的第%d个玩家，我的名字是%s" % (Player.number, self.name))

jack = Player('jack', 18)
jack.introduce()
rose = Player('rose', 18)
rose.introduce()